Skip to content

eidas and bankid -> samleid#837

Draft
johanlundberg wants to merge 28 commits intomainfrom
lundberg_samleid
Draft

eidas and bankid -> samleid#837
johanlundberg wants to merge 28 commits intomainfrom
lundberg_samleid

Conversation

@johanlundberg
Copy link
Member

No description provided.

- Add SamlEidMsg enum combining messages from both EidasMsg and BankIDMsg
- Add create_authn_info() function for initiating SAML authentication
- Add samleid session namespace property to EduidSession for session management
Add SamlEidNamespace to session namespaces and SamlEidAcsAction to
acs_enums. Add BankIDMethodTests with all 26 test methods ported from
bankid/tests/test_app.py, using SamlEidMsg and samleid response types.
…erage for error paths

- Remove duplicate shadowed methods in BankIDMethodTests (Python MRO made them dead code)
- Unskip 5 backdoor tests that work with default method='freja'
- Add test_verify_credential_eidas_not_allowed (views.py:87-89)
- Add test_saml2_metadata endpoint test (views.py:358-361)
- Add test_nin_verify_loa_mismatch for wrong LOA (acs_actions.py:35-38)
- Add test_unsolicited_saml_response for unknown request ID (views.py:290-295)

Test suite: 43 passed, 0 failed, 0 skipped
- Add tests for views.py error paths: invalid frontend_action, missing
  credential, method not available, magic cookie branches, get-status
- Add unit tests for helpers.py ValueError and proofing.py UnsupportedMethod
- Add verify-credential identity not matching test
- Fix test_nin_staging_remap_verify_bankid -> test_webauthn_token_verify_backdoor
- Remove duplicate @patch decorator and duplicate mock assignment

Test suite: 54 passed, 0 failed, 0 skipped
Coverage: 90% -> 93%
Run 25 tests with both freja and bankid methods using MethodConfig and
subTest loops, increasing coverage. Three backdoor tests remain
freja-only since ProofingMethodBankID does not implement magic cookie
NIN override.
use ruff disable/enable instead of ignoring rule per line
@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
30.4% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant